package com.example.lottery_system.service.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum ActivityPrizeStatus {
    INIT(1, "初始化"),
    COMPLETED(2, "已被抽取");
    private final Integer code;
    private final String message;

    public static ActivityPrizeStatus forName(String name) {
        for(ActivityPrizeStatus activityPrizeStatus : ActivityPrizeStatus.values()) {
            if(activityPrizeStatus.name().equalsIgnoreCase(name)) {
                return activityPrizeStatus;
            }
        }
        return null;
    }
}
